/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    overflow: hidden;
    background-color: #1a1a2e;
    color: white;
    height: 100vh;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(26, 26, 46, 0.95);
    transition: all 0.3s ease;
}

#game-map {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #16213e;
}

.hidden {
    display: none !important;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #e94560, #ff2e63);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 69, 96, 0.4);
}

.btn.secondary {
    background: linear-gradient(45deg, #4a47a3, #5c55ff);
    box-shadow: 0 4px 12px rgba(74, 71, 163, 0.3);
}

.btn.secondary:hover {
    box-shadow: 0 6px 16px rgba(74, 71, 163, 0.4);
}

/* 实体样式 */
.entity {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.player {
    background: linear-gradient(45deg, #4cc9f0, #4361ee);
    z-index: 10;
}

.enemy {
    background: linear-gradient(45deg, #f72585, #b5179e);
}

.bullet {
    width: 8px;
    height: 8px;
    background-color: #f1faee;
    border-radius: 50%;
    z-index: 5;
}

.chest {
    background: linear-gradient(45deg, #ffd700, #ff9f1c);
    width: 50px;
    height: 50px;
    z-index: 8;
}

/* 地图元素 */
.wall {
    position: absolute;
    background-color: #0f3460;
    border-radius: 4px;
    z-index: 20;
}

.door {
    position: absolute;
    width: 40px;
    height: 20px;
    background: linear-gradient(45deg, #6a0572, #ec4899);
    border-radius: 4px;
    z-index: 15;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* HUD样式 */
.game-hud {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background-color: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-hud {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 60%;
}

.bar {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.health-bar {
    width: 100%;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #e63946, #ff6b6b);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.mana-bar {
    width: 100%;
}

.mana-fill {
    height: 100%;
    background: linear-gradient(90deg, #457b9d, #1d3557);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.exp-bar {
    width: 100%;
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc857, #ff8c42);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.bar span {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: bold;
}

.player-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

/* 技能面板 */
.skills-panel {
    display: flex;
    gap: 15px;
}

.skill-slot {
    position: relative;
    width: 50px;
    height: 50px;
}

.skill-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #4a47a3, #5c55ff);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
}

.skill-cooldown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    transition: clip-path 0.1s linear;
}

/* 控制按钮 */
.game-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 战斗文字 */
.combat-text {
    position: absolute;
    color: white;
    pointer-events: none;
    font-size: 14px;
    font-weight: bold;
    z-index: 50;
    transform: translate(-50%, 0);
}

.damage-text {
    color: #ff6b6b;
}

.heal-text {
    color: #4cc9f0;
}

/* 升级面板 */
.panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(26, 26, 46, 0.95);
    border-radius: 12px;
    padding: 20px;
    z-index: 200;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#level-up-panel h3 {
    margin-bottom: 20px;
    text-align: center;
}

.upgrade-options {
    display: flex;
    gap: 20px;
}

.upgrade-option {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    width: 150px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.upgrade-option h4 {
    margin-bottom: 10px;
    color: #4cc9f0;
}

/* 说明界面 */
#instructions-screen ul {
    list-style: none;
    margin: 30px 0;
    max-width: 500px;
}

#instructions-screen li {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#instructions-screen i {
    width: 24px;
    text-align: center;
}

/* 游戏结束界面 */
#game-over-screen p {
    margin: 10px 0;
    font-size: 18px;
}

#game-over-screen span {
    color: #4cc9f0;
    font-weight: bold;
}
    